package JsonProcess;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

import Storage.Buddy;

public class jOneBuddy { // Parse JsonString
	public static Buddy process(String jsonText) throws JSONException {
		Buddy buddy = new Buddy();
		JSONObject object;
		object = (JSONObject) new JSONTokener(jsonText).nextValue();	
		buddy.setFname(object.getString("firstname"));
		buddy.setLname(object.getString("lastname"));
		return buddy;
	}

}
